package Constructions;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.KeyEvent;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URLClassLoader;
import java.util.ArrayList;

import javax.imageio.ImageIO;

import Main.SpaceGame;

public class Morgue extends Construction
{
	public ArrayList<String> nameList = new ArrayList<String>();
	BufferedImage sprite = null;
	
	public Morgue(int x, int y, SpaceGame main) 
	{
		super(x, y, main);
		width = 3;
		height = 2;
		workingTile = main.world.tiles[x+1][y+1];
		try {
			sprite = ImageIO.read(URLClassLoader.getSystemResource("Resources/"+"Morgue.png"));
		}
		catch (IOException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void draw(Graphics g) 
	{
		g.drawImage(sprite, x*10, y*10, null);
		drawFlash(g, x, y);
	}

	@Override
	public void setText() 
	{
		textColorIndex = 1;
		colors.add(Color.cyan);
		text.add(getName());
		
		colors.add(Color.cyan);
		text.add("");
		
		colors.add(Color.cyan);
		text.add("Here Lies:");
		
		for(String s: nameList)
		{
			colors.add(Color.green);
			text.add(s);
		}
	}

	@Override
	public String getName() 
	{
		return "Morgue";
	}
	
	@Override
	public void keyTyped(KeyEvent e) 
	{
		
	}

	@Override
	public void keyPressed(KeyEvent e) 
	{
		
	}

	@Override
	public void keyReleased(KeyEvent e) 
	{
		
	}
}
